package com.javatom.notes.feign.service;

import com.javatom.notes.common.User;
import com.javatom.notes.common.model.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@FeignClient(name = "apiProvide")
public interface UserFeignOperatService {



    @RequestMapping(method = RequestMethod.GET, value = "/user/list")
    BaseResponse<List<User>> getList();

    @RequestMapping(method = RequestMethod.GET, value = "/user/get")
    BaseResponse<User> getUser(User user);

    @RequestMapping(method = RequestMethod.POST, value = "/user/{userId}", consumes = "application/json")
    BaseResponse<User> update(@PathVariable("userId") Integer userId, User user);
}
